Skip to content

feat: add typed leading and trailing slots to List.Item - #5042

Draft
adam-sajko wants to merge 6 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots
Draft

feat: add typed leading and trailing slots to List.Item#5042
adam-sajko wants to merge 6 commits into
callstack:mainfrom
adam-sajko:feat/list-typed-slots

Conversation

@adam-sajko

@adam-sajko adam-sajko commented Aug 7, 2026

Copy link
Copy Markdown

Motivation

#4930 wants explicit slots instead of layout tied to render props. Right now left and right hand the caller a style object and a color and trust them to apply both, so List.Item does not really own its own layout.

Related issue

Related to #4930 and #4976

Draft, blocked on #5018. Stacked on #5041 and #5057. Only the typed slots commit is this PR's change, the rest is the stack until those merge. GitHub will show those commits until they land.

Two things I would like your call on:

  1. This is additive on purpose so it stays out of the way of refactor: replace React.Children usage to more composition-friendly alternatives (#4989) #5018, which changes how List.Item handles left and right. Since v6 alpha allows breaking changes without deprecation aliases, should the final version just drop left and right?
  2. Is leading and trailing the naming you want, or leadingAccessory and trailingAccessory, or one slots object?

Test plan

Unit tests.

@adam-sajko
adam-sajko force-pushed the feat/list-typed-slots branch from 734616a to 96e1127 Compare August 19, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant